var app = getApp(), 
appData = getApp().globalData;
Page({
  data: {
    info: []
  },
  tap: function (e) {
    var f = this.data.info;
    console.log(e)
    for (let i = 0; i < f.length; i++) {
      if (e.currentTarget.id == f[i].id) {
        app.modal('详细信息',
          '领取时间：' + f[i].date
        )
      }
    }
  },
  onLoad: function (op) {
    app.request('module/record', { openid: appData.user.openid }).then((info) => {
      console.log(info.name, info.data);
      this.setData({ info: info.data });
    })
    /*
    wx.login({
      success: function(log) {
        var data = {
          code: log.code
        };
        appReq('login/openid', data).then((res) => {
          //console.log(res); //正确返回结果
        }).catch((errMsg) => {
          console.log(errMsg);
          wx.showToast({
            icon: 'none',
            title: '网络连接失败',
          })
        });
      },
    })
    */
  },
  onShow: function () {
    var that = this;
    /*
    wx.request({
      url: 'https://jszxonline.xyz/AI/txAI/word/intention.php',
      header: { 'Content-type': 'charset = utf-8' },
      data: {
        text: '这是测试语句'
      },
      success: function(res) {
        console.log(res.data);
      }
    })
    */
  },

})